$(document).ready(function (){
	
    // Using custom configuration
    $(window).bind('resize orientationchange', function(){
        
    });

var ww = $( document ).width();
		if (ww > 768){
			
			$("#foo1").carouFredSel({
				width: 1600,
				height: "100%",
				left: 0,
				responsive: true,
				overflow: 'visible',
				prev: { key: "left" },
				next: { key: "right" },
				auto: false,
				mousewheel: true,
				swipe: {
				onMouse: true,
				onTouch: true
			},
			scroll: {
				items: 1,
				duration: 1000,
				pauseOnHover: true
			},
			items: {
				visible: {
					min: 4
				}
			}
			});
			pfHeight = 652;
	wHeight = null;
	wHeight = $(window).height();
	$( window ).resize(function(){
	if(wHeight != $(window).height()){
		wHeight = $(window).height();

		clearTimeout(sid);
		sid = setTimeout(function(){
				$(document.body).css('font-size', wHeight / pfHeight * 100 + '%');
			}, 50);
		}
	});
	$(document.body).css('font-size', wHeight / pfHeight * 100 + '%');
		} else{
			$('.search').click(function(){$('.search_wrap').show(); $('.back').show();});
			$('.back').click(function(){$('.search_wrap').hide(); $('.back').hide();});
		}

return false;

});